﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TestTwoGrid.aspx.cs" Inherits="TestCase_TestTwoGrid" %>

<%@ Register src="../dotNetFlexGrid/dotNetFlexGrid.ascx" tagname="dotNetFlexGrid" tagprefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
	<style type="text/css">
<!--
#form1 .title {
	font-size: 14px;
	font-style: normal;
	color: #000033;
	background-color: #66FFFF;
	padding: 4px;
	border: 1px solid #CCCCCC;
}
-->
	</style>
</head>
<script language="javascript" type="text/javascript">
    function Grid1Onclick(id) {
        //传递给Grid2一个查询选项数组
        var p = [
            { name: "MasterTableId", value: dotNetFlexGrid1.getCellDatas(id)[5] },
            { name: "用于测试的", value: "测试的值" + id }
        ];
        dotNetFlexGrid2.applyQueryReload(p);
        var p1 = [
            { name: "MasterTableId", value: '-1'},
            { name: "用于测试的", value: "测试的值" + id }
        ];
        dotNetFlexGrid3.applyQueryReload(p1);
    }
    function Grid2Onclick(id) {
        //传递给Grid3一个查询选项数组
        var p = [
            { name: "MasterTableId", value: dotNetFlexGrid2.getCellDatas(id)[5] },
            { name: "用于测试的", value: "测试的值" + id }
        ];
        dotNetFlexGrid3.applyQueryReload(p);
    }
</script>
<body>
    <form id="form1" runat="server">
    <div>
    
        <table width="800" border="0" align="center" cellpadding="2" cellspacing="2" bordercolor="#999999" >
            <tr>
                <td width="50%" bordercolor="#CCCCCC" class="title">
                    主表</td>
            	<td width="50%" bordercolor="#CCCCCC" class="title">从表</td>
            </tr>
            <tr>
                <td bordercolor="#CCCCCC">
                <!--主表绑定OnClick事件，对应的表格配置为单选，点击选择-->
                    <uc1:dotNetFlexGrid ID="dotNetFlexGrid1" runat="server" 
                    EventOnClickFunc="Grid1Onclick"
                    />                </td>
            	<td bordercolor="#CCCCCC">
            	<uc1:dotNetFlexGrid ID="dotNetFlexGrid2" runat="server" 
            	EventOnClickFunc="Grid2Onclick"
            	/></td>
            </tr>
            
            <tr>
                <td colspan="2" bordercolor="#CCCCCC" class="title">
                    从表的从表</td>
            	</tr>
            <tr>
                <td colspan="2" bordercolor="#CCCCCC">
                    <uc1:dotNetFlexGrid ID="dotNetFlexGrid3" runat="server" />                </td>
            	</tr>
        </table>
    
    </div>
    </form>
</body>
</html>
